package com.invoicerecognition.backend.controller.Invoice;

import com.alibaba.fastjson.JSONObject;
import com.invoicerecognition.backend.service.Invoice.GetInvoiceSearchResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class GetInvoiceSearchResultController {
    @Autowired
    private GetInvoiceSearchResultService getInvoiceSearchResultService;

    @GetMapping("/api/invoice/search-result")
    JSONObject getSearchResult(@RequestParam Map<String, String> data)  {
        return getInvoiceSearchResultService.getSearchResult(data);
    }
}
